A. Field of the Invention
The present invention relates to computer systems and, more specifically, to mechanisms for testing how these computer systems interact with long-term memory storage devices.
B. Description of Related Art
There is an obvious need to occasionally test how a computer system (host) interacts with a long-term memory storage device such as a hard drive, by individuals such as motherboard manufacturers, computer manufacturers, computer magazine reviewers and forensic device testers. When a host performs a read or write operation on a hard drive it may encounter an error message. How a host reacts to this error occasionally needs to be tested. A host interacts with a hard drive according to the hard drive's ID information on its features and capabilities. How a host reacts to different ID information occasionally needs to be tested.
A modern drive is composed of two main parts, a media where data is stored and a controller that reads and writes to the media. When a host issues read/write commands to a long-term memory storage device such as a hard drive, the host may encounter a bad area (sector) on the media. Upon encountering a bad sector the drive controller returns an error status when queried. In addition a register in the drive controller contains an error mode, such as: Error Always, Error on Read, Error on Write, Error Sometimes (Random), Error Sometimes then good after fixed number of retries for one or more attempts, Error Sometimes then good after random number of retries, etc.
Currently, to test how a host responds to an error, a tester assembles a collection of drives with known bad sectors. One might have a bad read sector, another a bad write sector, etc. One of the problems with this method is that drives change. Due to aging, temperature, humidity, etc. a sector that is good one day, might be bad another day, and vice versa. Because the status of sectors can change; this testing method is not reproducible. In addition, assembling, identifying and storing an assembly of drives with known bad sectors may be an onerous task.
For example, a magazine reviewer may be tasked with reviewing a disk-copying device. A device of this sort claims when it encounters a bad sector on the original, it writes all 0s on that sector, of a copy. To test this claim the reviewer needs a method to cause the device to respond to a bad sector on the original, in a known location.
Accordingly, there is a need in the art for an improved mechanism for testing how a host reacts to an error message from a memory storage device, such as a disk drive.
When a host encounters a long-term memory storage device such as a hard drive for the first time the host queries the device. The host needs detailed information about a device so the host will know how to address it correctly. For example, in the Drive ID packet of an IDE drive, information is reported that describes the speeds at which the drive may operate. A host that communicates with an IDE drive at the wrong speed will encounter errors.
Currently, to test how a host responds to a long-term memory storage device's ID information, a tester must assemble a large collection of drives. Assembling, identifying and storing a large assembly of drives may be an onerous task. In addition, testing in this fashion is very time consuming. Finally, every time a drive is changed there is a small chance the host may be damaged.
Accordingly, there is a need in the art for an improved mechanism for testing how a host reacts to ID information from computer long-term memory storage devices.
In summary, long-term memory storage devices communicate to a host their functions and capabilities through their Drive ID information. In addition these devices indicate to a host when an error is encountered during a read or write operation. Current methods to test how a host interacts with a long-term memory storage device are inefficient and burdensome. Accordingly, there is a need in the art for an improved mechanism for testing how a host interacts with a long-term memory storage device, such as a disk drive.